1. Field of the Invention
The present invention relates to a numerical controller having a function to previously store the respective contours of movable parts, such as a tool, workpiece, etc., and stationary parts of a machine and perform interference check based on the stored contour models.
2. Description of the Related Art
In a machine tool or the like that is controlled by a numerical controller, movable parts (control axes) of the machine are drivingly controlled by the numerical controller based on a previously created NC program, and a workpiece or the like to be machined is machined. If the NC program is erroneous or if the workpiece is wrongly mounted in the machine, the machine movable parts may possibly interfere with some other object(s). For example, a tool may run against the workpiece or a jig or the like for mounting the workpiece during operation of the machine.
Conventionally known is an apparatus that is configured to generate an alarm when it foresees such interference.
According to a known invention (see JP 2895316B), for example, the respective shapes of a workpiece, a tool, and a machine, including its interference check points, are set in advance, a motion command is read from a program, and they are used in checking the workpiece to see if it interferes with the tool or the machine.
Another known invention (see JP 2005-92654A) comprises an interference monitoring preparation device and an interference monitoring device. Contour interference determining means that is attached to these devices divides the range of product contours into categories, based on the respective contours of products to be machined and a tool used, and checks the contours of the tool and a machine for interference for each category.
In order to stop the action of a machine before a movable part (control axis) of a tool or the like interferes with some other object such as a workpiece during operation of the machine, whether or not interference is caused must be determined before the movable part is moved to a position where the interference occurs. This decision must be made fully ahead of the occurrence of the interference.
Before a motion amount based on a move block command from the NC program is outputted to a motor for driving the movable part, whether or not interference will occur is determined according to the position of the movable part based on the motion command, in analyzing the move block command and creating execution data. If it is concluded that interference will occur, an alarm is issued or an interlocked state is established without the output of the motion command to the servomotor for driving the movable part. The occurrence of interference can be avoided by stopping the operation of the machine in this manner.
The interference check takes time. Since the movable part is checked for interference with some other object, moreover, the check requires a very large amount of calculation. In some cases, therefore, a dedicated apparatus for interference check may be attached to the numerical controller. In these cases, communication between the body of the numerical controller and the interference checking device takes time. The operation of the machine is stopped if the numerical controller foresees the occurrence of interference after the interference checking device performs the interference check and delivers the result of the check to the numerical controller body. In doing this, a position for the movement of the movable part must be forecast based on the sum of at least a time required for interference check and the time for communication between the numerical controller body and the interference checking device. If the sum of the time required for interference check and the communication time is T, for example, a position of the movable part after the passage of the time T since the present time is determined to see if interference will occur. In order to stop operation in case of interference, it is necessary only that interference check be performed based on a pre-read command position after the passage of the time T since the present time. Since stopping the operation requires a deceleration time, however, interference check should be made in a motion command position for preceding time corresponding to the deceleration time.
The interference check should be performed at time intervals as short as possible. If the time intervals of the interference check are too long, interference having occurred once may possibly be canceled afterward in a position corresponding to the timing for the interference check. Therefore, the interference check period should be minimized. If the time required before the position used for the interference check is reached is shorter than a time required for interference check processing, however, a situation may occur such that interference is already caused by the time when it is concluded by the interference check processing that the interference will occur. Thus, the time before the position used for the interference check is reached should neither be too much shorter nor be too much longer than the time required for the interference check processing.
In using the numerical controller to control a mechanism in which movable parts that belong to different systems or machines work in one work space, in particular, the check period for interference between the two or more movable parts should be as short as possible.
Since the movable parts are movable, however, the state of interference between the movable parts and other objects changes, so that the interference check processing time fluctuates. In the case of the mechanism in which the movable parts that belong to the different systems or machines work in the one work space, as described above, in particular, the time required for interference check fluctuates considerably. For example, the time required for interference check when a movable part of one system is stopped varies substantially from the time required when the movable parts of both systems are moving. If the execution period for interference check is fixed based on the maximum required time for interference check, a problem is inevitably caused such that the occurrence of interference, if any, cannot be detected, as mentioned before.